﻿
namespace MockingBird.Studio.UI.Helpers
{
    using Thinktecture.Tools.Wscf.Services.ServiceDescription.Contract;
    using Thinktecture.Tools.Wscf.Services.ServiceDescription.Metadata;

    internal static class MetadataHelper
    {
        internal static ServiceDefinition ImportWsdl(string url)
        {
            IMetadataDiscovery discovery;
            ServiceDefinitionImporter wsdlImporter;
            ServiceDefinition serviceDefinition;

            discovery = new MetadataDiscovery();
            wsdlImporter = new ServiceDefinitionImporter(discovery);
            serviceDefinition = new ServiceDefinition();
            serviceDefinition = wsdlImporter.Import(url);

            return serviceDefinition;

        }
    }
}
